// Copyright 2007-2008 Rory Plaire (codekaizen@gmail.com)

using System;
using System.Collections.Generic;

namespace NPack.Interfaces
{
    /// <summary>
    /// Interface to a stream of vertex data.
    /// </summary>
    /// <typeparam name="TVertex">The type of vertex to stream.</typeparam>
    /// <typeparam name="TVertexComponent">The type of component in the vertex.</typeparam>
    public interface IVertexStream<TVertex, TVertexComponent>
        where TVertexComponent : IEquatable<TVertexComponent>, IComparable<TVertexComponent>,
            IComputable<TVertexComponent>, IConvertible
        where TVertex : IVector<TVertexComponent>
    {
        /// <summary>
        /// Gets an enumeration of the vertices in the object.
        /// </summary>
        /// <returns>An enumeration of vertex data contained by the object.</returns>
        IEnumerable<TVertex> GetVertexes();

        /// <summary>
        /// Gets an enumeration of the vertices in the object, applying a
        /// <paramref name="transform"/> to each vertex as it is returned.
        /// </summary>
        /// <param name="transform">A transform to apply to the vertex.</param>
        /// <returns>An enumeration of vertex data contained by the object.</returns>
        IEnumerable<TVertex> GetVertexes(ITransformMatrix<TVertexComponent> transform);
    }
}